﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once


namespace gcmp
{
    class GmTopoTrackingObject;

    /// 由于解耦需要，将该类暴露，其接口还未完善，
    /// 请产品端不要调用该类接口，后续平台将对其内容进行完善。
    class IGraphicsNodeIdAsker
    {
    public:
        /// \brief   获取拓扑追踪对象的 Id
        ///
        /// \param topoTrackingObject   拓扑追踪对象
        /// \return  拓扑追踪对象的 Id
        virtual Int32 GetOrCreateId(const GmTopoTrackingObject& topoTrackingObject) = 0;

        /// \brief   拓扑追踪对象是否存在
        ///
        /// \param topoTrackingObject   拓扑追踪对象
        /// \return  true 成功; false 失败
        virtual bool IsExisted(const GmTopoTrackingObject& topoTrackingObject) const = 0;

        /// \brief   获取拓扑追踪对象与其 Id 的映射关系
        ///
        /// \return  拓扑追踪对象与其 Id 的映射关系
        virtual const std::map<GmTopoTrackingObject, Int32>& GetTopoTrackingObjectToGNodeIdMap() const = 0;

        /// \brief   添加拓扑追踪对象与其 Id 的映射关系
        ///
        /// \param   topoTrackingObject  拓扑追踪对象
        /// \param   id                  拓扑追踪对象的 Id
        /// \return   true 成功; false 失败
        virtual bool AddTopoTrackingObjectAndId(const GmTopoTrackingObject& topoTrackingObject, Int32 id) = 0;
    };

}
